﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Ecommerce.Areas.Manager.Models
{
    public class Customer
    {
        public int CustomerID { get; set; }

        [Required(ErrorMessage = "Your name is required")]
        [StringLength(50, ErrorMessage = "Max length of your name is 50")]
        public string FullName { get; set; }

        [Required(ErrorMessage = "Your email is required")]
        [EmailAddress(ErrorMessage = "Email is incorrect")]
        public string Email { get; set; }

        [Required(ErrorMessage = "Password is required")]
        [StringLength(50, ErrorMessage = "Max length of password is 50")]
        public string Password { get; set; }

        [NotMapped]
        [Column("HasOrder")]
        public string HasOrder { get; set; }

        public virtual List<Order> OrderList { get; set; }
    }
}